4641a4
@@ -219,6 +219,12 @@
public final class ProcessorDefinitionHelper {
             // special for choice
             if (out instanceof ChoiceDefinition) {
                 ChoiceDefinition choice = (ChoiceDefinition) out;
+
+                // ensure to add ourself if we match also
+                if (type.isInstance(choice)) {
+                    found.add((T)choice);
+                }
+
                 for (WhenDefinition when : choice.getWhenClauses()) {
                     if (type.isInstance(when)) {
                         found.add((T)when);   
@@ -240,6 +246,12 @@
public final class ProcessorDefinitionHelper {
             // special for try ... catch ... finally
             if (out instanceof TryDefinition) {
                 TryDefinition doTry = (TryDefinition) out;
+
+                // ensure to add ourself if we match also
+                if (type.isInstance(doTry)) {
+                    found.add((T)doTry);
+                }
+
                 List<ProcessorDefinition<?>> doTryOut = doTry.getOutputsWithoutCatches();
                 doFindType(doTryOut, type, found);
 
@@ -259,6 +271,12 @@
public final class ProcessorDefinitionHelper {
             // special for some types which has special outputs
             if (out instanceof OutputDefinition) {
                 OutputDefinition outDef = (OutputDefinition) out;
+
+                // ensure to add ourself if we match also
+                if (type.isInstance(outDef)) {
+                    found.add((T)outDef);
+                }
+
                 List<ProcessorDefinition<?>> outDefOut = outDef.getOutputs();
                 doFindType(outDefOut, type, found);
 
